package com.nine.news.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author: szhan
 * @Date: 2023/03/22/8:55 AM
 * @Description:
 */

@TableName("t_user_message_log")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserMsg {
    /** 序号 */
    @TableId(type = IdType.AUTO)
    private Integer id ;
    /** 用户id */

    private Integer uid ;
    /** 消息类型 */

    private Integer type ;
    /** 消息主题 */

    private String title ;
    /** 消息内容 */

    private String info ;
    /** 创建时间 */

    private Date createTime ;

    public UserMsg(Integer uid, Integer type, String title, String info) {
        this.uid = uid;
        this.type = type;
        this.title = title;
        this.info = info;
        this.createTime = new Date();
    }
}
